import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    petowner: {
    id:0,
      name:'',
      password:'',
      money:0
    },
    petstore:{
      id:'',
      name:'',
      password:'',
      balance:''
    }

  },
  getters: {
  },
  mutations: {
    setPetowner(state,obj){
      state.petowner={...obj};
    },
    setPetstore(state,obj){
      state.petstore={...obj};
      console.log(state.petstore)
    }
  },
  actions: {
  },
  modules: {
  }
})
